

package comet;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity; 
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
@Entity
public class Enseignant implements Serializable{
    @Id
      
        private int indice;
      
        private String Nom;
      
        private String Prenom;
      
        private String Email;
      
      public Enseignant(){}
      public Enseignant(int indice,String nom,String prenom,String email){
  
      this.indice=indice;
  
      this.Nom=nom;
  
      this.Prenom=prenom;
  
      this.Email=email;
  }
 
   public  int getIndice(){return this.indice;}
  public void setIndice(int  indice){this.indice =indice; }
 
   public  String getNom(){return this.Nom;}
  public void setNom(String  nom){this.Nom =nom; }
 
   public  String getPrenom(){return this.Prenom;}
  public void setPrenom(String  prenom){this.Prenom =prenom; }
 
   public  String getEmail(){return this.Email;}
  public void setEmail(String  email){this.Email =email; }
 
 
 
      
    
  
  
  
      

                              
                            
                              
                              
          


 
      
  
              
                  
                  @ManyToMany (fetch=FetchType.ALL,cascade)
	               @JoinTable(name="Enseignant_Etudiant", 
	                  joinColumns=@JoinColumn(name="Enseignant_ID"),
	                   inverseJoinColumns=@JoinColumn(name=" Etudiant_ID"))  
	               private Collection <Etudiant> etudiants= new ArrayList<Etudiant>(); 
	               
	               public Collection<Etudiant> getEtudiant() {
		    return etudiants;
		  }

		  public void setEtudiant(Collection<Etudiant> etudiants) {
		    this.etudiants = etudiants;
		  }
	               
	               
	               
	             org.eclipse.emf.ecore.impl.DynamicEObjectImpl@dc67e (eClass: org.eclipse.emf.ecore.impl.EClassImpl@ccc588 (name: EntityReference) (instanceClassName: null) (abstract: false, interface: false))
	        
                     
                    
                  
                    
                                      
  
                              
                            
                              
                              
          


 
      
    
  
  
  
      

                              
                            
                              
                              
          


 
    
     
    } 
